<template>
		<view class="row">
			<view class="span24-8 px-2 mb-2" v-for="(item,index) in label.list" :key="index">
				<view @tap="changeRadio(index)" :class="label.selected===index?'radio-active':''" class="border rounded border-light-secondary  px-2 py-1 bg-light-secondary text-center ">
					{{item.name}}
				</view>
			</view>
		</view>
</template>

<script>
	export default{
		props:{
			label:Object
		},
		created() {
			console.log(this.label)
		},
		methods:{
			changeRadio(index){
				this.$emit('update:selected',index)
			}
		}
	}
</script>

<style scoped>
	.radio-active{
		background-color: #fce0d5 !important;
		color: #eb7320 !important;
		border-color:#eb7320 !important;
	}
</style>
